package com.un.ebs.sys.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.un.ebs.core.metadata.DbField;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Date;

/**
 * (AppRole)表实体类
 *
 * @author liubo
 * @since 2021-01-12 16:14:28
 */
@Data
@Component
@TableName("sys_app_role")
@SuppressWarnings("serial")
public class AppRole extends Model<AppRole> {

    @TableId(value = "id", type = IdType.UUID)
    private String id;


    @DbField(name = "app_id", length = 40, precision = 0)
    private String appId;

    @DbField(name = "code", length = 50, precision = 0)
    private String code;

    @DbField(name = "name", length = 255, precision = 0)
    private String name;

    @TableLogic
    @DbField(name = "is_delete", length = -1, precision = 0)
    private Boolean isDelete;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_at", length = 40, precision = 0)
    private String createAt;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_time", length = -1, precision = 0)
    private Date createTime;

    @TableField(fill = FieldFill.UPDATE)
    @DbField(name = "last_modified_at", length = 40, precision = 0)
    private String lastModifiedAt;

    @TableField(fill = FieldFill.UPDATE)
    @DbField(name = "last_modified_time", length = -1, precision = 0)
    private Date lastModifiedTime;

    @DbField(name = "sort", length = -1, precision = 0)
    private Integer sort;

    @DbField(name = "tenant_id", length = 40, precision = 0)
    private String tenantId;

    @DbField(name = "homepage_url", length = 100, precision = 0)
    private String homepageUrl;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}